package com.gxuwz.stats.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gxuwz.stats.entity.ResearchPlatform;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@Mapper
public interface ResearchPlatformMapper extends BaseMapper<ResearchPlatform> {

    @Insert("INSERT INTO rsp_research_platform " +
            "(user_id, platform_name, platform_type, platform_category, platform_score,platform_notes) " +
            "VALUES " +
            "(#{userId}, #{platformName}, #{platformType}, #{platformCategory}, #{platformScore}, #{platformNotes})")
    int insertWithUserId(ResearchPlatform researchPlatform);

    /**
     * 二级管理员-查询
     */
    IPage<ResearchPlatform> getTwoAdminRePlatformList(IPage<ResearchPlatform> page, @Param("params") Map<String, Object> params);
}
